import reducerHandler from 'shared/utils/reducerHandler';
import { LOADING_BAR_SHOW } from '../consts/loadingActionTypes';

const initialState = {
  display: false,
  text: ''
};

const handlers = {
  [LOADING_BAR_SHOW](state, action) {
    return Object.assign({}, state, { display: action.payload });
  },
};

export default reducerHandler(initialState, handlers);
